package leetcode.剑指offer;

public class 二叉树的镜像27 {
    public TreeNode mirrorTree(TreeNode root) {
        process(root);
        return root;

    }

    private void process(TreeNode root) {
        if(root == null)
            return;
        TreeNode temp = root.right;
        root.right = root.left;
        root.left = temp;
        process(root.left);
        process(root.right);
    }
}
